public class LQB_code1_7add {
    public static void main(String[] args) {
        int n = 0; //香蕉的数量
        while (true){
            int a,b,c,d;
            a=b=c=d=0;
            if (n%5==1){
                a=n/5*4;
                if (a%5==2){
                    b=a/5*4;

                    if (b%5==3){
                        c=b/5*4;

                        if (c%5==4){
                            d=c/5*4;

                            if (d%5==0&&d>0){
                                break;
                            }}}}}
            n++;
        }
        System.out.println(n);
    }
}

